
<script>
$(document).ready(function() {
	function eventTabClickHandler(){
		$('#Events').hide();
		$.ajax({
			url: "/ws/getEvents",
			dataType: 'json',
			async: false,
			data: {},
			success: function(eventData) {
				var events = '';
				$.each(eventData, function(row, data){
					

					var dt = new Date(data['start'] * 1000);
					var dstring = dt.getMonth() + '/' + dt.getDate();

					events += "<div id='eventDiv'> "+
					"<div id='eventData'>"+
					"<a href='"+data['url']+"'> "+ dstring +" - "+ data['title']+ " @ " +data['room']+ "</a>" 
					+"</div></div>";
				});
				$('#Events').html(events)
				$('#Events').fadeIn(1000);
			}
			
		});
		
	}

	//$('#eventData:odd').addClass('zebra');
	
	// execute on load
	eventTabClickHandler();
	
	$( "#tabl-1" ).click(eventTabClickHandler) ;
	
});
</script>

<div id="schedDiv">
	<div class="tabHead">Upcoming Events</div>
	<div id='Events' >
		
	</div>



</div>


